function EnterKeyClick(button,event) 
{    
if (event.keyCode == 13) 
{        
//  event.keyCode=9;
//  event.returnValue = false;
//  document.all[button].click(); 
  $(button).click(); 
//  document.getElementById(button).click();

}
}
function PostReply(UserName) {
    $("comment_txt").focus();
    if (UserName) {
        $("comment_txt").value = "@" + UserName + " ";
    }
}
function RemoveHTML(str) {
    var regEx = /<[^>]*>/g;
    return str.replace(regEx, "");
}
function SearchCheck2() {
    if (document.top_search.keyWords.value == "") {
        alert("请输入");
        document.top_search.keyWords.focus();
    }
    else {
        return true;
    }
    return false;
}
function ctrlEnter(ID, event) {
    if ((event.ctrlKey && event.keyCode == 13) || (event.altKey && event.keyCode == 83)) {
        p_comment(ID);
    }
}
function SearchCheck() {
	if (document.search_form1.keyWords.value == "") {
		alert("请输入");
		document.search_form1.keyWords.focus();
	}
	else {
        return true;
    }
    return false;
}


//¹ö¶¯
function startMarquee(h, speed, delay, sid) {
    var t = null;
    var p = false;
    var o = $(sid);
    o.innerHTML += o.innerHTML;
    o.onmouseover = function() { p = true }
    o.onmouseout = function() { p = false }
    o.scrollTop = 0;
    function start() {
        t = setInterval(scrolling, speed);
        if (!p) {
            o.scrollTop += 2;
        }
    }
    function scrolling() {
        if (p) return;
        if (o.scrollTop % h != 0) {
            o.scrollTop += 2;
            if (o.scrollTop >= o.scrollHeight / 2) o.scrollTop = 0;
        } else {
            clearInterval(t);
            setTimeout(start, delay);
        }
    }
    setTimeout(start, delay);
}
